﻿@{
    Layout = "";
}

<!DOCTYPE html>

<html>
<head>
    <title>点检单记录信息Routine check sheet record information</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!-- VENDOR CSS -->
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/jquery/jquery-ui.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/bootstrap/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/bootstrap/bootstrap-datetimepicker.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/font-awesome/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/toastr/toastr.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/klorofil/main.css">
    <link rel="stylesheet" type="text/css" href="~/Content/aztech-style.css">

    <script type="text/javascript" src="~/Scripts/vendor/modernizr-2.6.2.js"></script>
</head>
<body>
    <div class="panel">
        <div class="panel-body">
            <form id="recordForm" class="form-horizontal">
                <div id="equipmentCode" class="form-group">
                    <label for="equipmentCode" class="col-sm-2 control-label">站位编号Station number</label>
                    <div class="col-sm-9">
                        <div class="input-group input-group-sm">
                            <input type="text" class="form-control" placeholder="请填写站位编号Please fill in the station number" v-model="record.Equipment.BaseInfo.Code" v-on:blur="GetEquipment" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>
                <div id="line" class="form-group">
                    <label for="line" class="col-sm-2 control-label">拉别Label</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请填写拉别Please fill in label" v-model="record.BaseInfo.Line" />
                    </div>
                </div>
                <div id="model" class="form-group">
                    <label for="model" class="col-sm-2 control-label">机型model</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请填写机型Please fill in the model" v-model="record.BaseInfo.Model" />
                    </div>
                </div>
                <div id="testpositiontype" class="form-group">
                    <label for="testpositiontype" class="col-sm-2 control-label">站位类型Station type</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请填写站位类型Please fill in the station type" v-model="record.BaseInfo.TestPositionType" />
                    </div>
                </div>

                <div id="JigNo1" class="form-group">
                    <label for="JigNo" class="col-sm-2 control-label">测试机架(治具)编号Test rack (fixture) No</label>
                    <div class="col-sm-9">
                        <div class="input-group input-group-sm">
                            <input id="id_JigNo1" type="text" class="form-control" placeholder="请填写编号1Please fill in No. 1" v-model="record.BaseInfo.Jig_No1" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode_Jig_No1">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>

                <div id="JigNo2" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <div class="input-group input-group-sm">
                            <input id="id_JigNo2" type="text" class="form-control" placeholder="请填写编号2Please fill in No. 2" v-model="record.BaseInfo.Jig_No2" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode_Jig_No2">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>

                <div id="JigNo3" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <div class="input-group input-group-sm">
                            <input id="id_JigNo3" type="text" class="form-control" placeholder="请填写编号3Please fill in No. 3" v-model="record.BaseInfo.Jig_No3" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode_Jig_No3">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>

                <div id="JigNo4" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <div class="input-group input-group-sm">
                            <input id="id_JigNo4" type="text" class="form-control" placeholder="请填写编号4Please fill in No. 4" v-model="record.BaseInfo.Jig_No4" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode_Jig_No4">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>

                <div id="JigNo5" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <div class="input-group input-group-sm">
                            <input id="id_JigNo5" type="text" class="form-control" placeholder="请填写编号5Please fill in No. 5" v-model="record.BaseInfo.Jig_No5" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode_Jig_No5">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>

                <div id="JigNo6" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <div class="input-group input-group-sm">
                            <input id="id_JigNo6" type="text" class="form-control" placeholder="请填写编号6Please fill in No. 6" v-model="record.BaseInfo.Jig_No6" />
                            <span class="btn input-group-addon" v-on:click="ScanQrcode_Jig_No6">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>
                <div id="SoftwareVersion" class="form-group">
                    <label for="SoftwareVersionInput" class="col-sm-2 control-label">软件版本Software version</label>
                    <div class="col-sm-9">
                        <div class="input-group input-group-sm">
                            <input id="SoftwareVersionInput" type="text" class="form-control" placeholder="请填写软件版本Please fill in the software version" v-model="record.BaseInfo.SoftwareVersion" />
                            <span class="btn input-group-addon" v-on:click="ScanSoftwareVersion">
                                <i class="fa fa-qrcode">
                                    <input type="file" class="form-control" accept="image/*" style="display: none;" />
                                </i>
                            </span>
                        </div>
                    </div>
                </div>


                <div id="recordDate" class="form-group">
                    <label for="recordDate" class="col-sm-2 control-label">点检日期Routine check date</label>
                    <div class="col-sm-9">
                        <div class="input-group input-group-sm">
                            <input id="recordDatePicker" type="text" class="form-control" v-model="record.BaseInfo.RecordDate" />
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>

                <div id="checkerName" class="form-group">
                    <label for="checkerName" class="col-sm-2 control-label">点检人Spot inspector</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请填点检人姓名Please fill in the name of the spot inspector" v-model="record.CheckerInfo.Name" v-on:blur="GetCheckerInfo" />
                    </div>
                </div>
                <div id="checkerInfo" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <table class="table table-bordered">
                            <tbody>
                                <tr class="warning">
                                    <td>邮箱mailbox</td>
                                    <td>{{record.CheckerInfo.Email}}</td>
                                </tr>
                                <tr class="warning">
                                    <td>电话Telephone</td>
                                    <td>{{record.CheckerInfo.Mobile}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>



                <div id="approverName" class="form-group">
                    <label for="approverName" class="col-sm-2 control-label">管理员（签核）Administrator (sign off)</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请填签核人姓名Please fill in the name of the approver" v-model="record.ApproverInfo.Name" disabled />
                    </div>
                </div>
                <div id="approverInfo" class="form-group">
                    <div class="col-sm-9 col-sm-offset-2">
                        <table class="table table-bordered">
                            <tbody>
                                <tr class="warning">
                                    <td>邮箱mailbox</td>
                                    <td>{{record.ApproverInfo.Email}}</td>
                                </tr>
                                <tr class="warning">
                                    <td>电话Telephone</td>
                                    <td>{{record.ApproverInfo.Mobile}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div id="templateFormID" class="form-group">
                    <label for="templateFormID" class="col-sm-2 control-label">点检单模板Routine check doc template</label>
                    <div class="col-sm-9">
                        <select class="form-control" v-model="record.TemplateForm.BaseInfo.ID" v-on:change="GetTemplateForm">
                            <option v-for="(form, index) in templateFormList" v-bind:value="form.ID">{{form.Name}}</option>
                        </select>
                    </div>
                </div>
                <div id="maintItems" class="form-group">
                    <label for="maintItems" class="col-sm-2 control-label">点检项目Routine check items</label>
                    <div class="col-sm-9">
                        <ul class="list-group">
                            <li v-if="record.TemplateForm.Items.length > 0" class="list-group-item text-right">
                                <button class="btn btn-info" v-on:click="BatchItemCheck">一键通过One click through</button>
                            </li>
                            <li v-bind:id="'itemRecord' + index" class="list-group-item" v-for="(item, index) in record.TemplateForm.Items">
                                <div class="row">
                                    <div class="col-sm-7">
                                        <h5>{{item.Name}}</h5>
                                    </div>
                                    <div class="col-sm-5 text-right">
                                        <button class="btn btn-default btn-xs" v-on:click="ItemCheck($event, index, 2, item.IsValue)">跳过Skip</button>
                                        <button class="btn btn-danger btn-xs" v-on:click="ItemCheck($event, index, 0, item.IsValue)">不通过Fail</button>
                                        <button class="btn btn-success btn-xs item-pass-btn" v-on:click="ItemCheck($event, index, 1, item.IsValue)">通过Pass</button>
                                    </div>
                                    <div class="col-sm-12" style="padding-top: 5px;">
                                        <input v-bind:id="'itemRemark' + index" class="form-control input-sm" type="text" placeholder="请填写相应结果或问题Please fill in the corresponding results or questions。" v-on:blur="ItemRemark($event, index)" />
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-9">
                        <input type="text" v-model="record.BaseInfo.ID" hidden />
                        <button v-if="isNewRecord" class="btn btn-primary" v-on:click="SaveRecord($event)">保存preservation</button>
                        <button v-if="!isNewRecord" class="btn btn-default" v-on:click="UpdateRecord($event)">更新renew</button>
                        <button class="btn btn-warning" v-on:click="Signout($event)">登出Logout</button>
                    </div>
                </div>
            </form>
        </div>

    </div>


    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery.cookie.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/bootstrap/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/klorofil/klorofil-common.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/respond.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/vue/vue.min.js"></script>
    <script type="text/javascript" src="~/Scripts/aztech-global.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    <script type="text/javascript" src="~/Scripts/aztech-script.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    <script type="text/javascript" src="~/Scripts/pageJs/RoutineInspection/RecordDetail.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
</body>
</html>
